using System.Collections.ObjectModel;

namespace Demo02
{
    public class MainPageViewModel : BindableBase
    {
        public MainPageViewModel()
        {
            for (int i = 0; i < 20; i++)
            {
                this.Documents.Add(DocumentModel.Factory(i));
            }
            this.Selected = this.Documents[0];
        }

        DocumentModel _Selected = default(DocumentModel);
        public DocumentModel Selected { get { return _Selected; } set { SetProperty(ref _Selected, value); } }

        ObservableCollection<DocumentModel> _Documents = new ObservableCollection<DocumentModel>();
        public ObservableCollection<DocumentModel> Documents { get { return _Documents; } }
    }
}